<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; Charset=utf-8" />
    <meta http-equiv="Content-Language" content="zh-CN" />
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
    <title>小粽熊QVQ-个人博客</title>
    <link rel="shortcut icon" href="/static/home/images/logo.png" type="image/x-icon" />
    <!--Layui-->
    <link href="/static/home/layui/css/layui.css" rel="stylesheet" />
    <!--font-awesome-->
    <link href="/static/home/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
    <!--全局样式表-->
    <link href="/static/home/css/global.css" rel="stylesheet" />
    <link href="/static/home/css/animate.min.css" rel="stylesheet" />
    <link href="/static/home/css/public.css" rel="stylesheet" />
    <!-- 本页样式表 -->
    <link href="/static/home/css/index.css" rel="stylesheet" />
    <link href="/static/home/css/blog.css" rel="stylesheet" />
    <link rel="stylesheet" href="/static/home/css/APlayer.min.css">
</head>

<body>

<nav class="blog-nav fl-nav layui-header">
    <div class="blog-container ">
        <!-- QQ互联登陆 -->
        <a href="javascript:;" class="blog-user login">
            <i class="fa fa-qq"></i>
        </a>
        <div class="make">
            <div class="overlay"></div>
            <div class="container">
                <div class="table-item">
                    <div class="panfish">
                        <img src="/static/home/images/login1.png" alt="login1.png" class="imgsrc">
                    </div>
                    <div class="close-btn">
                        <i class="icomoon"></i>
                    </div>
                    <h2 class="tab-list">
                        <a href="javascript:;" >注册</a>
                        <a href="javascript:;" class="current">登录</a>
                    </h2>
                </div>
                <div class="table-list">
                    <form action="{:url('/index/User/login')}" method="post" class="make_form">
                        <h3 class="login_title">用户名</h3>
                        <div class="input-group">
                            <div class="input-box">
                                <input type="text" placeholder="请输入用户名" class="mobile" name="user_name">
                            </div>
                        </div>
                        <h3 class="login_title">密码</h3>
                        <div class="input-group">
                            <div class="input-box">
                                <input type="password" placeholder="请输入密码" class="mobile" name="user_pwd">
                            </div>
                        </div>
                        <div class="prompt-box">其他登录方式</div>
                        <div class="agreement-box">
                            <input type="checkbox" required /><span>注册登录即表示同意</span>
                            <a href="#" target="_blank">用户协议</a> 、
                            <a href="#" target="_blank">隐私政策</a>
                        </div>
                        <button type="submit" class="layui-btn layui-btn-normal btn">登 录</button>
                    </form>
                    <form action="" method="post" class="make_form hide">
                        <h3 class="login_title">用户名</h3>
                        <div class="input-group">
                            <div class="input-box">
                                <input type="text" placeholder="请输入用户名" class="mobile" name="user_name">
                            </div>
                        </div>
                        <h3 class="login_title">密码</h3>
                        <div class="input-group">
                            <div class="input-box">
                                <input type="password" placeholder="请输入密码" class="mobile" name="user_pwd">
                            </div>
                        </div>
                        <div class="prompt-box">其他登录方式</div>
                        <div class="agreement-box">
                            <input type="checkbox" /><span>注册登录即表示同意</span>
                            <a href="#" target="_blank">用户协议</a> 、
                            <a href="#" target="_blank">隐私政策</a>
                        </div>
                        <button type="submit" class="layui-btn layui-btn-normal btn">注 册</button>
                    </form>
                </div>
            </div>
        </div>
        <a href="javascript:;" class="blog-user layui-hide">
            <img src="/static/home/images/Absolutely.jpg" alt="Absolutely" title="Absolutely" />
        </a>

        <a class="blog-logo" href="{:url('/index/index/home')}">小粽熊QVQ</a>

        <ul class="layui-nav" lay-filter="nav">
            <li class="layui-nav-item layui-this">
                <a href="{:url('/index/index/home')}"><i class="fa fa-home fa-fw"></i>&nbsp;网站首页</a>
            </li>
            <li class="layui-nav-item">
                <a href="{:url('/index/index/article_list')}"><i class="fa fa-file-text fa-fw"></i>&nbsp;文章专栏</a>
            </li>
            <li class="layui-nav-item">
                <a href="{:url('/index/index/resource')}"><i class="fa fa-paper-plane-o fa-fw"></i>&nbsp;资源分享</a>
            </li>
            <li class="layui-nav-item">
                <a href="{:url('/index/index/little_things')}"><i class="fa fa-hourglass-half fa-fw"></i>&nbsp;点点滴滴</a>
            </li>
            <li class="layui-nav-item">
                <a href="{:url('/index/index/about')}"><i class="fa fa-info fa-fw"></i>&nbsp;关于本站</a>
            </li>
            <span class="layui-nav-bar"></span></ul>
            <a class="blog-navicon" href="javascript:;">
                <i class="fa fa-navicon"></i>
            </a>
    </div>
</nav>

<div class="blog-body">
    <canvas id="canvas-banner" style="background: #393D49;"></canvas>
</div>
<script>
    let login = document.querySelector('.login');
    let make = document.querySelector('.make');
    let overlay = make.querySelector('.overlay');
    let makeForm = make.querySelector('.make_form');
    let closeBtn = make.querySelector('.close-btn');
    let mobile = make.getElementsByClassName('mobile');
    let yzm = make.querySelector('.yzm');
    let inputBox = make.getElementsByClassName('input-box');
    let imgSrc = make.querySelector('.imgsrc');
    let list = document.getElementsByClassName('tab-list');
    let lis = list[0].children;
    let content = document.getElementsByClassName('table-list');
    let ul = content[0].children;
    let res_btn = document.querySelectorAll('.btn');

    // 遮罩层
    //登入
    login.addEventListener('click', function() {
        make.style.display = 'block';
    });
    closeBtn.addEventListener('click', function() {
        make.style.display = 'none';
    });

    //获取焦点
    mobile[0].addEventListener('focus', function() {
        inputBox[0].className = 'input-box input-box-focus';
        imgSrc.src = '/static/home/images/login2.png';
    });
    //失去焦点
    mobile[0].addEventListener('blur', function() {
        inputBox[0].className = 'input-box';
        imgSrc.src = '/static/home/images/login1.png';
    });

    //密码焦点
    mobile[1].addEventListener('focus', function() {
        inputBox[1].className = 'input-box input-box-focus';
        imgSrc.src = '/static/home/images/login3.png';
    });
    //验证码失去焦点
    mobile[1].addEventListener('blur', function() {
        inputBox[1].className = 'input-box';
        imgSrc.src = '/static/home/images/login1.png';
    });

    // 提升用户体验
    overlay.addEventListener('click', function(e) {
        make.style.display = 'none';
    });
    for (let j = 0; j < lis.length; j++) {
        console.log()
    }

    //切换
    for (let i = 0; i < lis.length; i++) {
        lis[i].setAttribute('index', i);
        lis[i].addEventListener('click', function() {
            for (let j = 0; j < lis.length; j++) {
                lis[j].className = '';
            }
            this.className = 'current';
            let index = this.getAttribute('index');
            for (let k = 0; k < ul.length; k++) {
                ul[k].className = 'make_form';
            }
            ul[index].className = 'hide';
        });
    }
    //默认登录

</script>